In [1]:
import pandas as pd
import plotly.express as px
from plotly.subplots import make_subplots
import plotly.graph_objects as go
In [2]:
report_1 = pd.read_csv(r"C:\Users\berat\OneDrive\Masaüstü\PICS\Logs\pics_log-2022-12-21-16-53-38\Report\1.report_simulation_trace_broker.csv")
In [3]:
report_1
Out[3]:
CLOCK JOB_RECV(CUMM) JOB_RECV(UNIT) JOB_COMP(CUMM) JOB_COMP(UNIT) VM_RUN VM_STUP VM_ACT VM_STOP VM_COST($)
0 60 0 0 0 0 0 0 0 0 0.0
1 120 1 1 0 0 1 1 0 0 1.6
2 180 1 0 0 0 1 0 1 0 1.6
3 240 2 1 0 0 1 0 1 0 1.6
4 300 2 0 0 0 1 0 1 0 1.6
... ... ... ... ... ... ... ... ... ... ...
165 9960 99 1 96 0 2 0 2 35 59.2
166 10020 100 1 97 1 2 0 2 35 59.2
167 10080 100 0 98 1 2 0 2 35 59.2
168 10140 100 0 98 0 2 0 2 35 59.2
169 10200 100 0 99 1 1 0 1 36 59.2

170 rows × 10 columns

In [4]:
report_2 = pd.read_csv(r"C:\Users\berat\OneDrive\Masaüstü\PICS\Logs\pics_log-2022-12-21-16-58-07\Report\1.report_simulation_trace_broker.csv")
In [5]:
report_2['vertical-scaling'] = "On"
In [6]:
report_1['vertical-scaling'] = "Off"
In [7]:
df = pd.concat([report_1, report_2])
In [8]:
fig = px.line(df, x="CLOCK", y="VM_COST($)", color='vertical-scaling')
fig.show()
In [9]:
report_1 = pd.read_csv(r"Logs\pics_log-2022-12-21-17-17-41\Report\1.report_simulation_trace_broker.csv")
In [10]:
report_1["scenario"] = "small workload"
In [11]:
report_2 = pd.read_csv(r"Logs\pics_log-2022-12-21-17-20-55\Report\1.report_simulation_trace_broker.csv")
In [12]:
report_2["scenario"] = "high workload"
In [13]:
df = pd.concat([report_1, report_2])
fig = px.line(df, x="CLOCK", y="VM_COST($)", color='scenario')
fig.update_xaxes(range = [0, 10000])
fig.update_yaxes(range = [0, 100])
fig.show()
In [14]:
report_1['SUM_VM_STUP'] = report_1['VM_STUP'].cumsum(axis = 0)
In [15]:
report_2['SUM_VM_STUP'] = report_2['VM_STUP'].cumsum(axis = 0)
In [16]:
df = pd.concat([report_1, report_2])
fig = px.line(df, x="CLOCK", y="SUM_VM_STUP", color='scenario')
fig.update_xaxes(range = [0, 10000])
fig.show()
In [17]:
report_3 = pd.read_csv(r"Logs\pics_log-2022-12-21-17-59-25\Report\1.report_simulation_trace_broker.csv")
In [18]:
report_3["scenario"] = "increased network bandwidth"
In [19]:
fig1 = px.line(report_3, x="CLOCK", y="VM_COST($)", color='scenario')
fig1.show()
In [20]:
report_2["scenario"] = "default network bandwidth"
In [21]:
fig2 = px.line(report_2, x="CLOCK", y="VM_COST($)", color='scenario')
fig2.show()
In [22]:
fig = make_subplots(rows=2, cols=1)

fig.add_trace(
    go.Scatter(x=report_2["CLOCK"], y=report_2["VM_COST($)"], mode = "lines", name = "default"),
    row=1, col=1
)

fig.add_trace(
    go.Scatter(x=report_3["CLOCK"], y=report_3["VM_COST($)"], mode = "lines", name = "increased"),
    row=2, col=1
)

fig.update_xaxes(title_text="CLOCK", row=1, col=1)
fig.update_xaxes(title_text="CLOCK", row=2, col=1)


fig.update_yaxes(title_text="VM_COST($)", row=1, col=1)
fig.update_yaxes(title_text="VM_COST($)", range=[0, 600], row=2, col=1)


fig.show()